<html>
	<head>
		<meta charset="utf-8">
		<title>Test for Local Storage</title>
		<script type="text/javascript" src="../library/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="../library/js/json2.js"></script>
		<script type="text/javascript" src="../library/js/localstorage.js" ></script>
		

		<script type="text/javascript">
		$(document).ready(function() {

		$("#btnRead").live("click",function(){
			alert("licked");
			$("#output").html($(this).readLocalStorage("1"));
		});

		$("#btnWrite").live("click",function(){
				$.ajax({
					type: "GET",
					dataType: "json",
					url: "http://localhost/WebContent/puppet_rest/work.php/partners",
					success: function(data)
					{
						prepare_json = JSON.stringify(data);
						$(this).writeLocalStorage("1",prepare_json);
						$("#output").html(prepare_json);
					}
				});

		});
});
		</script>
	</head>
	<body>
		<button type="button" id="btnWrite">Write</button>
		<button type="button" id="btnRead">Read</button>
		<div id="output"></div>
	</body>
</html>